home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / shwdlg16.hqx / ShowDialog XCMD 1.6 / card_8709.txt < prev    next >
Text File  |  1989-05-10  |  6KB  |  124 lines

  1. -- card: 8709 from stack: in.6
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3411
  5. -- name: Type 6 XCMD
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 80
  10. -- high flags: A003
  11. -- rect: left=297 top=151 right=173 bottom=393
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Type 6 Help
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   ShowDialog 6,4748,1003,5,1,FALSE
  23. end mouseUp
  24.  
  25. -- 6 is type
  26. -- 4748 is DLOG resource ID
  27. -- 1003 is the first PICT to display
  28. -- 5 is the total number of PICTs to cycle
  29. -- 1 means the first PICT in the sequence is shown when the
  30. -- dialog is first displayed
  31. -- FALSE means that you can't cycle round and round thru the PICTs
  32. --  (In other words, when you get to the last PICT, the "NEXT" button
  33. --   grays out; and when you get to the first PICT, the "PREV" button
  34. --   grays out.)  If this parameter was TRUE, you would be able to
  35. --   cycle continuously thru the PICTs
  36. -- the PICTs must be numbered sequentially
  37. --  (in this case the 5 PICTs are 1003, 1004, 1005, 1006, and 1007)
  38.  
  39.  
  40. -- part 3 (button)
  41. -- low flags: 00
  42. -- high flags: 0000
  43. -- rect: left=11 top=4 right=64 bottom=78
  44. -- title width / last selected line: 0
  45. -- icon id / first selected line: 529 / 529
  46. -- text alignment: 1
  47. -- font id: 0
  48. -- text size: 12
  49. -- style flags: 0
  50. -- line height: 16
  51. -- part name: SD
  52.  
  53.  
  54. -- part contents for background part 21
  55. ----- text -----
  56. ShowDialog XCMD Type 6
  57.  
  58. -- part contents for background part 30
  59. ----- text -----
  60. 18
  61.  
  62. -- part contents for background part 15
  63. ----- text -----
  64. ShowDialog Type 6 parameters are:
  65.  
  66. ShowDialog 6,<DLOG resource ID>,<resource ID of first PICT>,<total number of PICTs to show>,
  67. <PICT to display>,<cycle screens BOOLEAN>,
  68. [<top coord>,<left coord>]
  69.  
  70. where 6 is the type of the external;
  71. <DLOG resource ID> is the DLOG resource ID;
  72. <resource ID of first PICT> is the ID number of the first PICT in the PICT "sequence";
  73. <total number of PICTs to show> is the total number of PICTs that will be cycled through;
  74. <PICT to display> is the ordinal number of the PICT 
  75. (from the sequence) that will be shown when the dialog is first displayed (1 will show the first PICT in the sequence, 5 will show the fifth);
  76. <cycle screens BOOLEAN> describes whether the screens can be cycled.  If this parameter is FALSE, the PREV and NEXT buttons will gray out on the first and last PICTs respectively.  If TRUE, the buttons NEVER gray out and the screens can be cycled through continuously.
  77.  
  78. Once again, the last two parameters, for specifying the location of the dialog, are OPTIONAL.
  79.  
  80. If you click DITL item#1, the result will contain FALSE.  If you have an ENABLED DITL item#7, and click on it, the result will contain TRUE.  See the script of the "ListDialog 2" on the card "ShowDialog XCMD Type 7" for an example. 
  81. ΓÇó Click┬áhere┬áto┬ásee┬áit┬ánow. ΓÇó
  82.  
  83. The first PICT ID can be ANY number.  The subsequent PICTs MUST be sequentially numbered.  So if you specify your first PICT as 2001, the others MUST be 2002, 2003, 2004, etc.
  84.  
  85.  
  86.  
  87. -- part contents for background part 17
  88. ----- text -----
  89. Follow this outline when constructing the DITL resource:
  90.  
  91. DITL item# 1: an ENABLED button.  This will be the Cancel button.  
  92. DITL item# 2: a DISABLED useritem.  This item will be the area into which the PICTs will be drawn and, consequently, should be made large.
  93. DITL item# 3: your "Previous" button.  Clicking this will cycle the PICTs backward.
  94. DITL item# 4: your "Next" button.  Clicking this will cycle the PICTs forward.
  95. DITL item# 5: DISABLED static text.  This will contain a descriptive header for each PICT.
  96. DITL item# 6: DISABLED static text.  This will contain a running tally of the PICTs.  It will contain the phrase "Page x of y," where x is the ordinal number of the PICT currently displayed, and y is the total number of PICTs.  DITL items 5 and 6 are OPTIONAL; you can omit them if you want.
  97.  
  98. If a required PICT resource is missing, the dialog will beep and appear with a blank display.
  99. Notice how the "header" and "tally" fields change as you cycle through the PICTs in Type 6.
  100.  
  101. Your PICTs will be displayed within DITL item# 2 
  102. (the useritem) of the template.  They will be centered if they are smaller then the display field and will be SCALED DOWN to fit into the field if they are too large.  Keep in mind that if your PICTs are too large for the display rectangle that they will be squashed down to fit.  (This is unsightly.)
  103.  
  104. PICTs are costly, in terms of disk space.  A PICT with a large bitmap graphic can make your stack very large.  This is ESPECIALLY true for color PICTs.  A tip for economizing on your PICTs is to create them in a unified graphics application, such as SuperPaint.  Make the graphic in the paint layer and then switch to the draw layer for the text.  When you copy the image to the Clipboard (for later pasting into the stack with ResEdit) the text will be saved as ASCII, NOT as a bitmap.  The resulting PICT will be smaller than if you had done the text in the paint layer.
  105.  
  106. After you have created your PICT and inserted it into the stack with ResEdit, be sure to name the resource with something descriptive.  It is the PICT's name that will appear in the "header" field  (DITL item# 5) in Type 6 of ShowDialog.
  107.  
  108.  
  109.  
  110. -- part contents for background part 18
  111. ----- text -----
  112.            •••••••••••••••••
  113. If you've been using versions of ShowDialog older than 1.5 please note that the parameters for Type 6 have changed to make it function more closely to Type 5.
  114.            •••••••••••••••••
  115.  
  116. ShowDialog XCMD Type 6 displays PICTs within the dialog in a fashion similar to Type 5.  The difference is that this dialog contains a "Previous" and a "Next" button for cycling through the total number of PICTs.  
  117.  
  118. This dialog can also optionally contain a descriptive
  119.  "header" for each PICT, and a running tally of which one of the total number of PICTs is being displayed.  
  120.  
  121. Here, too, clicking on the Cancel button, or hitting enter or return dismisses the dialog.
  122.  
  123.  
  124.